<html>
<head>
	 <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	 <script type="text/javascript"
	 src="/wow/static/jquery/jquery-3.2.1.min.js"></script>
	 <script type="text/javascript"
	 src="/wow/static/easyui/jquery-easyui-1.5.2/easyui_all.js"></script>
	 	 <script type="text/javascript"
	 src="/wow/static/easyui/jquery-easyui-1.5.2/jquery.easyui.min.js"></script>
	 
	 <script type="text/javascript" src="/wow/static/layer/layer.js"></script>
	 <script type="text/javascript" src="/wow/static/js/warriorSimulation.js"></script>
	 <link rel="stylesheet" type="text/css"
	href="/wow/static/easyui/jquery-easyui-1.5.2/themes/metro-gray/easyui.css">
	<style type="text/css">
		body{
			background-color:#181818;
			
		}
		.body{
		  width:425px;
		  height:552px;
		  display:flex;
		  flex-direction:column;/*布局从上向下*/
		  margin-left:10px;
		  margin-top:20px;
		
		}
		header{
			display: flex;
			/* background: #abcdef; */
			width: 100%;
			height: 60px;
			justify-content: center;/*水平居中*/
			align-items: center;/*垂直居中*/
		}
		header p,footer p{
			font-size: 0.24rem
		}
		.container{
		  display:flex;
		  height: 540px;
		  flex-wrap: wrap;
	      justify-content: space-between;
	      
		}
		.container .content{
		  flex:1;/*占1/4份   1+2+1=4，所以说一共4份*/
/* 	 	  background: pink; 
 */		}
		.container .nav{
		  flex:3;/*占2/4份*/
		  
/* 		  background: #ccc;  */
		}
		.container .ads{
		  flex:1;/*占1/4份*/
		  align-items:center;
/* 		  background: orange */
		}
		footer{
			 width: 100%;
			 height: 60px;
			 display: flex;
			 flex-direction:row;
		}
		.quip{
		    flex:1;
			width: 68px;
			height: 68px;
/* 			border:1px solid #000; */
		}
		.equipment{
			margin:3px;
			padding:5px 5px 5px 5px;
		}
		.icon {
		    height: 64px;
		    width: 64px;
		    top: 2px;
		    left: 2px;
		}
		.q {
		color:#ffd100!important;
		}
		
		.q0,.q0 a {
		color:#9d9d9d!important;
		}
		
		.q1,.q1 a {
		color:#fff!important;
		}
		
		.q2,.q2 a {
		color:#1eff00!important;
		}
		
		.q3,.q3 a {
		color:#0070dd!important;
		}
		
		.q4,.q4 a {
		color:#a335ee!important;
		}
		
		.q5,.q5 a {
		color:#ff8000!important;
		}
		.q1{
			color:#000000;
		}
		table.gridtable {
			padding-left:90px;
			padding-top:30px;
			display:table-cell;
			vertical-align: middle;
		}
		.buffColumn{
			display: -webkit-flex; /* Safari */
		     -webkit-flex-wrap: wrap; /* Safari 6.1+ */
		     display: flex;
		     flex-wrap: wrap;
		      width:300px;
		}
		.buffItem{
			width: 32px;
			height: 32px;
/*  			border:1px solid #000; */
		}
		.buff{
/* 			border:1px solid #000; */
		}
		.buffIcon {
		    height: 25px;
		    width: 25px;
		}
		.debuffColumn{
			 display: -webkit-flex; /* Safari */
		     -webkit-flex-wrap: wrap; /* Safari 6.1+ */
		     display: flex;
		     flex-wrap: wrap;
		      width:300px;
		}
		.debuffItem{
			width: 32px;
			height: 32px;
/*  			border:1px solid #000; */
		}
		.debuffIcon {
		    height: 25px;
		    width: 25px;
		}
		 .iInput{
            position: absolute;
            width: 99px;
            height: 16px;
            left: 1px;
            top: 2px;
            border-bottom: 0px;
            border-right: 0px;
            border-left: 0px;
            border-top: 0px;
        }
	</style>
	<script type="text/javascript">
		var layer = top.layer;
		var getRoleAttrIng=false;
		var armor=4691,dr;
		var attr;
		var offHandCacheCode;
		$(function() {
			$(".equipment").each(function(i,v){
				var code=$(v).attr('code')
				if(code){
	 				$.ajax({
						type : "GET",
						async : true,
						url : '/wow/equip/getTooltip?code='+code,
						beforeSend : function(){
						},
						success : function(data){
							$(v).tooltip({
								content:'<div style="background-color:#c7ccd1;">'+data+'</div>'
							});
						},
						error : function(){
						}
					}); 
				}
				
				$(v).bind('click',function(){
					allotHandler($(v));
				});
 
			});
			var raceData=[
				{'name':'暗夜精灵','value':'NightElfWarrior'},
				{'name':'人类','value':'HumanWarrior'},
				{'name':'兽人','value':'OrcsWarrior'}
					]
			$('#race').combobox({
				textField : 'name',
				valueField : 'value',
				data : raceData,
				onLoadSuccess: function(){
					$('#race').combobox('setValue','HumanWarrior');
				},
				onChange:function(rec){
					getRoleAttr();
				}

			});
			
			$.ajax({
				type : "GET",
				async : true,
				url : '/wow/monster/findAll',
				beforeSend : function(){
				},
				success : function(data){
					console.log(data);
					$('#boss').combobox({
						textField : 'name',
						valueField : 'id',
						data : data.data,
						onLoadSuccess: function(){
							$('#boss').combobox('setValue','1');
						},
						onSelect:function(rec){
							
						}

					});
					armor = data.data[0].armor;
					dr = getDr(data.data[0].armor)*100;
					$('#bossArmor').text('  护甲: '+armor);
					$('#bossDr').text('  减伤: '+fomatFloat(dr,2)+"%");
					
				},
				error : function(){
				}
			}); 
			
			
			initEnchant();
			
			getRoleAttr();
			
			$('#duration').combobox('setValue','120');
		});
		
		function initEnchant(){
			
			var headEnchantData=[
				{'name':'不附魔','value':'0'},
				{'name':'+8 力量','value':'8s'}
			]
			$('#headEnchant').combobox({
				textField : 'name',
				valueField : 'value',
				data : headEnchantData,
				onChange:function(rec){
					getRoleAttr()
				}
			});
			
			var shoulderEnchantData=[
				{'name':'不附魔','value':'0'},
				{'name':'攻击强度+30','value':'30ap'}
			]
			$('#shoulderEnchant').combobox({
				textField : 'name',
				valueField : 'value',
				data : shoulderEnchantData,
				onChange:function(rec){
					getRoleAttr()
					
				}
			});
			var cloakEnchantData=[
				{'name':'不附魔','value':'0'},
				{'name':'+3敏捷','value':'3n'}
			]
			$('#cloakEnchant').combobox({
				textField : 'name',
				valueField : 'value',
				data : cloakEnchantData,
				onChange:function(rec){
					getRoleAttr()
					
				}
			});
			
			var breastplateshoulderEnchantData=[
				{'name':'不附魔','value':'0'},
				{'name':'+3全属性','value':'3a'},
				{'name':'+4全属性','value':'4a'}
			]
			$('#breastplateshoulderEnchant').combobox({
				textField : 'name',
				valueField : 'value',
				data : breastplateshoulderEnchantData,
				onChange:function(rec){
					getRoleAttr()
					
				}
			});
			
			
			var bracerEnchantData=[
				{'name':'不附魔','value':'0'},
				{'name':'+9力量','value':'9s'}
			]
			$('#bracerEnchant').combobox({
				textField : 'name',
				valueField : 'value',
				data : bracerEnchantData,
				onChange:function(rec){
					getRoleAttr()
					
				}
			});
			
			var gauntletsEnchantData=[		
				{'name':'不附魔','value':'0'},
				{'name':'+7 力量','value':'7s'},
				{'name':'+15 敏捷','value':'15n'}
			]
			$('#gauntletsEnchant').combobox({
				textField : 'name',
				valueField : 'value',
				data : gauntletsEnchantData,
				onChange:function(rec){
					getRoleAttr()
					
				}
			});
			
			var pantsEnchantData=[
				{'name':'不附魔','value':'0'},
				{'name':'+8 力量','value':'8s'}
			]
			$('#pantsEnchant').combobox({
				textField : 'name',
				valueField : 'value',
				data : pantsEnchantData,
				onChange:function(rec){
					getRoleAttr()
					
				}
			});
			
			var bootsEnchantData=[
				{'name':'不附魔','value':'0'},
				{'name':'+7 敏捷','value':'7n'}
			]
			$('#bootsEnchant').combobox({
				textField : 'name',
				valueField : 'value',
				data : bootsEnchantData,
				onChange:function(rec){
					getRoleAttr()
					
				}
			});
			
		}
	
		function mouseOverHandler(equip){
			var id=  $(equip).attr('id');
			
		 	
		}
		
		function getRoleAttr(){
			if(getRoleAttrIng){
				return;
			}
			var equipmentCodes=[];
			$(".equipment").each(function(i,v){
				var code=$(v).attr('code')
				equipmentCodes.push(code);
			});
			
			var buffCodes=[];
			$(".buff").each(function(i,v){
				var code=$(v).attr('id');
				buffCodes.push(code);
			});
			
			var strengthEnchant = 0;
			var nimbleEnchant = 0;
			var apEnchant = 0;
			
			var enchantData = getAttrEnchant();
			
			var raceData = $('#race').combobox('getValue');
			getRoleAttrIng = true;
			$.ajax({
				type : "POST",
				async : true,
				url : '/wow/index/getWarriorAttr',
				dateType:'json',
				contentType : 'application/json',
				data:JSON.stringify({
					'race':raceData,
					'equipments':equipmentCodes,
					'mainHand':$('#mainHand').attr('code'),
					'offHand':$('#offHand').attr('code'),
					'buffs':buffCodes,
					'enchantData':enchantData
				}),
				success : function(data){
					console.log(data);
				    attr = data.data;
					$('#strength').text("力量："+attr.strength);
					$('#nimble').text("敏捷："+attr.nimble);
					$('#endurance').text("耐力："+attr.endurance);
					$('#skills').text("熟练度："+attr.mainHandSkill);
					$('#damage').text("伤害："+attr.mainHandDamage);
					$('#speed').text("攻速："+attr.mainHandSpeed+"/"+attr.offHandSpeed);
					$('#ap').text("攻强："+attr.ap);
					$('#crit').text("暴击率："+fomatFloat(attr.mainHandCrit,2));
					$('#hitRate').text("命中率："+attr.hitRate);
					
					$('#strength').tooltip({
						content:"<span style='font-size:11px;'>每增加一点力量增加2点近战攻击强度</span>"
					})
					$('#nimble').tooltip({
						content:"<span style='font-size:11px;'>每20点敏捷增加一暴击</span>"
					})
					
					var dev = getDeviationRelief(attr);
					var skillsToolTip="<table style='font-size:11px;'>"
					+"<tr><td>面对??级目标时:</td></tr>"
					+"<tr><td>你的攻击将有"+dev.dodge+"%的几率被躲闪;</td></tr>"
					+"<tr><td>需要"+dev.skillMiss+"%的命中保证技能没有MISS;</td></tr>"
					+"<tr><td>"+dev.miss+"%的命中时普攻没有MISS;</td></tr>"
					+"<tr><td>偏斜时,造成"+dev.def*100+"%的普攻伤害,偏斜的几率固定为40%.</td></tr>"
					+"</table>";
					$('#skills').tooltip({
						content:skillsToolTip
					})
					var damageToolTip="<table style='font-size:11px;'>"
					+"<tr><td>主手伤害："+attr.mainHandDamage+"</td></tr>"
					+"<tr><td>主手秒伤："+fomatFloat(attr.mainHandDps,2)+"</td></tr>"
					+"<tr><td>副手伤害："+attr.offHandDamage+"</td></tr>"
					+"<tr><td>副手秒伤："+fomatFloat(attr.offHandDps,2)+"</td></tr>"
					+"</table>";
					$('#damage').tooltip({
						content:damageToolTip
					})
					$('#ap').tooltip({
						content:"<span style='font-size:11px;'>提高"+fomatFloat(attr.ap/14,1)+"点秒伤</span>"
					})
					$('#crit').tooltip({
						content:"<span style='font-size:11px;'>面对??级目标时,将受到3%的暴击抑制</span>"
					})
					var hitRateTooltip="<table style='font-size:11px;'>"
						+"<tr><td>面对??级目标时:</td></tr>"
						+"<tr><td>你将有"+fomatFloat(dev.miss-attr.hitRate,1)+"%的普攻Miss</td></tr>"
						+"<tr><td>你的暴击收益阈值为"+fomatFloat(100-40-dev.miss-dev.dodge+attr.hitRate,1)+"%</td></tr>"
						+"</table>";
					$('#hitRate').tooltip({
							content:hitRateTooltip
						});
					getSimulation();
					getRoleAttrIng=false;
					
					
				},
				error : function(){
				}
			}); 
			
			
			getSuitTooltip(equipmentCodes)
		}
		
		function getSuitTooltip(codes){
			$.ajax({
				type : "POST",
				async : true,
				url : '/wow/equip/warriorSuitTooltip',
				data:JSON.stringify({
					'equipments':codes
				}),
				dateType:'json',
				contentType : 'application/json',
				success : function(data){
					console.log(data);
					$("#suitTooltip").datagrid("loadData", data.data);
				}
			});
			
		}
		
		function getSimulation(){
 			$.ajax({
 				type : "POST",
 				async : true,
 				url : '/wow/index/getWarriorSimulation',
 				dateType:'json',
 				data:{
 					ac:armor
 				},
 				success : function(data){
 					console.log(data);
					$("#dg").datagrid("loadData", data.rows);
 				}
 			});
			
			
		}
		
		
		  function getDeviationRelief(attr){
			  
			  	var skills = attr.mainHandSkill;
			  	var hr = attr.hitRate;
				var dodge = 6.5 - 0.1*(skills-300);
				var miss;
				var skillMiss;
				if(skills<305){
					
					miss =  27-0.2*(skills-300);
					skillMiss = 8-0.2*(skills-300)+1;
					//ncrit = ncrit+0.2*(skills-300);
					
					def  = parseFloat(((1.2-0.03*(315-skills)+1.3-0.05*(315-skills))/2).toFixed(2));
				}else if(skills>= 305&&skills<308){
				    miss =  27-2-0.1*(skills-305);
				    skillMiss = 8-2-0.1*(skills-305);
					//ncrit = ncrit+0.2*(skills-300);
					def  = parseFloat(((1.2-0.03*(315-skills)+1.3-0.05*(315-skills))/2).toFixed(2));
				}else{
					miss =  27-2-0.1*(skills-305);
					skillMiss = 8-2-0.1*(skills-305);
					//ncrit = ncrit+0.2*(skills-300);
					def  =  0.95;
				}
				
				console.log('偏斜减免'+def);
				
				var result = {
					'dodge':dodge,
					'miss':miss,
					'skillMiss':skillMiss,
					'def':def
				}
				
				return result;
		 }
	
		
		function getAttrEnchant(){
			var enchantData={
				'strength':0,
				'nimble':0,
				'intelligence':0,
				'mental':0,
				'endurance':0,
				'ap':0
			}
			enChantCalculation(enchantData,$('#headEnchant').combobox('getValue'));
			enChantCalculation(enchantData,$('#shoulderEnchant').combobox('getValue'));
			enChantCalculation(enchantData,$('#cloakEnchant').combobox('getValue'));
			enChantCalculation(enchantData,$('#breastplateshoulderEnchant').combobox('getValue'));
			enChantCalculation(enchantData,$('#bracerEnchant').combobox('getValue'));
			enChantCalculation(enchantData,$('#gauntletsEnchant').combobox('getValue'));
			enChantCalculation(enchantData,$('#pantsEnchant').combobox('getValue'));
			enChantCalculation(enchantData,$('#bootsEnchant').combobox('getValue'));
			
			return enchantData;
		}
		function enChantCalculation(enchantData,value){
			if(value.endWith('n')){
				enchantData.nimble+=parseInt(value.replace('n',''));
			}else if(value.endWith('s')){
				enchantData.strength+=parseInt(value.replace('s',''));
			}else if(value.endWith('ap')){
				enchantData.ap+=parseInt(value.replace('ap',''));
			}else if(value.endWith('a')){
				enchantData.nimble+=parseInt(value.replace('a',''));
				enchantData.strength+=parseInt(value.replace('a',''));
				enchantData.intelligence+=parseInt(value.replace('a',''));
				enchantData.mental+=parseInt(value.replace('a',''));
				enchantData.endurance+=parseInt(value.replace('a',''));
			}
			
		}

		String.prototype.endWith = function(endStr){
		      var d = this.length - endStr.length;
		      return (d >= 0&&this.lastIndexOf(endStr) == d)
		}
		function allotHandler(obj){
			var position = obj.attr('id');
			var type='all';
			var width = '800px';//($(document).width() - 100) + 'px';
			var height = '600px';//($(document).height() - 100) + 'px';
			layer.open({
				id : 'win_order',
				type : 2,
				title : '更换装备',
				area : [ width, height ],
				maxmin : true,
				content : '/wow/equipment.html?type='+type+"&position="+position, //这里content是一个URL，如果你不想让iframe出现滚动条，你还可以content: ['http://sentsin.com', 'no']
				btn : [ '选择', '取消' ],
				yes : function(index, layero) {
					var iframeWin = layero.find("iframe")[0].contentWindow;
					var equipCode=iframeWin.save();
					layer.closeAll('iframe');
					$.ajax({
						type : "GET",
						async : true,
						url : '/wow/equip/findByCode?code='+equipCode,
						beforeSend : function(){
						},
						success : function(data){
							if(data.success){
								obj.tooltip({
									content:'<div style="background-color:#c7ccd1;">'+data.data.equipTooltip+'</div>'
								});
								obj.attr('code',data.data.equipId);
								obj.children().first().attr("src","/wow/static/icon/"+data.data.equipImg);
								if(data.data.equipPostion=='双手'){
									$('#offHand').attr('hidden','hidden');
									offHandCacheCode =$('#offHand').attr('code');
									$('#offHand').attr('code','');
									
								}else if(data.data.equipPostion=='单手'||data.data.equipPostion=='主手'){
									$('#offHand').removeAttr('hidden');
									if($('#offHand').attr('code')==''){
										$('#offHand').attr('code',offHandCacheCode);
									}
								}
								getRoleAttr();
							}
						},
						error : function(){
						}
					}); 	
				
				},
				btn2 : function(index, layero) {
					layer.close(index);
				}
			});
		}
		function addBuff(){
			var width = '800px';//($(document).width() - 100) + 'px';
			var height = '600px';//($(document).height() - 100) + 'px';
			layer.open({
				id : 'win_buff',
				type : 2,
				title : '添加BUFF',
				area : [ width, height ],
				maxmin : true,
				content : '/wow/buff.html', //这里content是一个URL，如果你不想让iframe出现滚动条，你还可以content: ['http://sentsin.com', 'no']
				btn : [ '选择', '取消' ],
				yes : function(index, layero) {
					var iframeWin = layero.find("iframe")[0].contentWindow;
					var items=iframeWin.save();
					layer.closeAll('iframe');
					console.log(items);
					
					for(var i=0;i<items.length;i++){
						var item = items[i];
						if($("#buffColumn" ).children( "#buff"+item.id ).length==0){
							var imgUrl = '/wow/static/icon/'+item.img
							if(item.id=='14'){
								$('#buff16').tooltip('hide');
								$('#buff16').remove();
								imgUrl = $("#mainHand").find("[class='icon']").attr('src');
							}else if(item.id=='15'){
								$('#buff17').tooltip('hide');
								$('#buff17').remove();
								imgUrl = $("#offHand").find("[class='icon']").attr('src');
							}else if(item.id=='16'){
								$('#buff14').tooltip('hide');
								$('#buff14').remove();
								imgUrl = $("#mainHand").find("[class='icon']").attr('src');
							}else if(item.id=='17'){
								$('#buff15').tooltip('hide');
								$('#buff15').remove();
								imgUrl = $("#offHand").find("[class='icon']").attr('src');

							}		
							
							$('#buffColumn').append(
								"<div class='buff' id='buff"+item.id +"'>"
									+"<img class='buffIcon' src='"+imgUrl+"'/>"
								+"</div>");	
						 	$('#buff'+item.id).tooltip({
								content:item.tooltip
							}); 
								
							$('#buff'+item.id).click(function(e){
								var id=e.currentTarget.getAttribute('id');
								console.log(id);
								$('#'+id).tooltip('hide');
								e.currentTarget.remove();
								getRoleAttr();
							});
						}
					}
					
					getRoleAttr();
				
				},
				btn2 : function(index, layero) {
					layer.close(index);
				}
			});
			
			
		}
		function addDeBuff(){
			var width = '800px';//($(document).width() - 100) + 'px';
			var height = '600px';//($(document).height() - 100) + 'px';
			layer.open({
				id : 'win_debuff',
				type : 2,
				title : '添加debuff',
				area : [ width, height ],
				maxmin : true,
				content : '/wow/debuff.html', //这里content是一个URL，如果你不想让iframe出现滚动条，你还可以content: ['http://sentsin.com', 'no']
				btn : [ '选择', '取消' ],
				yes : function(index, layero) {
					var iframeWin = layero.find("iframe")[0].contentWindow;
					var items=iframeWin.save();
					layer.closeAll('iframe');
					console.log(items);
					debugger;
					for(var i=0;i<items.length;i++){
						var item = items[i];
						if($("#debuffColumn" ).children( "#debuff"+item.id ).length==0){
							$('#debuffColumn').append(
								"<div class='debuff' id='debuff"+item.id +"'>"
									+"<img class='debuffIcon' src='/wow/static/icon/"+item.img+"'/>"
								+"</div>");	
						 	$('#debuff'+item.id).tooltip({
								content:item.tooltip
							}); 
								
							$('#debuff'+item.id).click(function(e){
								var id=e.currentTarget.getAttribute('id');
								console.log(id);
								$('#'+id).tooltip('hide');
								e.currentTarget.remove();
								if(id=='debuff1'){
									armor = armor+2250;
								}else if(id=='debuff2'){
									armor = armor+505;
								}else if(id=='debuff3'){
									armor = armor+640;
								}
								dr = getDr(armor)*100;
								$('#bossArmor').text('  护甲: '+armor);
								$('#bossDr').text('  减伤: '+fomatFloat(dr,2)+"%");
								getRoleAttr();
							});
							if(item.id==1){
								armor = armor-2250;
							}else if(item.id==2){
								armor = armor-505;
							}else if(item.id==3){
								armor = armor-640;
							}
						}
					}
					dr = getDr(armor)*100;
					$('#bossArmor').text('  护甲: '+armor);
					$('#bossDr').text('  减伤: '+fomatFloat(dr,2)+"%");
					getRoleAttr();
				
				},
				btn2 : function(index, layero) {
					layer.close(index);
				}
			});
		}
	</script>
</head>
<body>
<div class="easyui-layout" fit="true">
	<div class="easyui-window" title="狂暴战模拟器" icon="icon-help" style="width:1100px;height:720px;padding:5px;background: #fafafa;">
		<div class="easyui-layout" fit="true">
			<div region="west"  style="width:470px;">
				<div fit='true' class="easyui-tabs">
				<div title='装备' class='nav'>
					<div class="body">
<!-- 						  <header> <p>装备模拟器</p> </header> -->
						  <div class="container">
						    <main class="content">
						    	<div class='quip'>
						    		<div class='equipment' id='helmet' code='12640' >
						    			<img class='icon' src="/wow/static/icon/inv_helmet_36.png">
						    		</div>
						    	</div>
						    	<div class='quip'>
						    		<div class='equipment' id='necklace' code='18404'>
						    			<img class='icon' src="/wow/static/icon/inv_jewelry_necklace_09.png">
						    		</div>
						    	</div>
						        <div class='quip'>
						        	<div class='equipment' id='shoulder' code='12927'>
						    			<img class='icon' src="/wow/static/icon/inv_shoulder_10.png">
						        	</div>
						        </div>
						        <div class='quip'>
						        	<div class='equipment' id='cloak' code='13340'>
						    			<img class='icon' src="/wow/static/icon/inv_misc_cape_20.png">
						        	</div>
						        </div>
						        <div class='quip'>
						        	<div class='equipment' id='breastplate' code='11726'>
						    			<img class='icon' src="/wow/static/icon/inv_chest_chain_15.png">
						        	</div>
						        </div>
						        <div class='quip' >
						        	<div class='equipment' code='49'>
						    			<img class='icon' src="/wow/static/icon/inv_shirt_05.png">
						        	</div>
						        </div>
						        <div class='quip'>
						        	<div class='equipment' code='20132'>
						    			<img class='icon' src="/wow/static/icon/inv_shirt_guildtabard_01.png">
						        	</div>
						        </div>
						    </main>
						    <nav class="nav">
						    
						    </nav>
						    <aside class="ads">
						    	<div class='quip'>
						    		<div class='equipment' id='gauntlets' code='15063'>
						    			<img class='icon' src="/wow/static/icon/inv_gauntlets_26.png">
						        	</div>
						    	</div>
						    	<div class='quip'>
						    		<div class='equipment' id='belt' code='19137'>
						    			<img class='icon' src="/wow/static/icon/inv_belt_29.png">
						        	</div>
						    	</div>
						        <div class='quip'>
						        	<div class='equipment' id='pants' code='15062'>
						    			<img class='icon' src="/wow/static/icon/inv_pants_wolf.png">
						        	</div>
						        </div>
						        <div class='quip' >
						        	<div class='equipment' id='boots' code='14616'>
						    			<img class='icon' src="/wow/static/icon/inv_boots_01.png">
						        	</div>
						        </div>
						        <div class='quip' >
						        	<div class='equipment' id='ring1' code='17063'>
						    			<img class='icon' src="/wow/static/icon/inv_jewelry_ring_15.png">
						        	</div>
						        </div>
						        <div class='quip'>
						        	<div class='equipment' id='ring2' code='18821'>
						    			<img class='icon' src="/wow/static/icon/inv_jewelry_ring_07.png">
						        	</div>
						        </div>
						        <div class='quip'>
						        	<div class='equipment' id='talisman1' code='11815'>
						    			<img class='icon' src="/wow/static/icon/inv_jewelry_talisman_01.png">
						        	</div>
						        </div>
						    </aside>
						  </div>
						  <footer> 
									<div class='quip'>
						    		<div class='equipment' id='bracer' code='12936'>
						    			<img class='icon' src="/wow/static/icon/inv_bracer_17.png">
						        	</div>
						    	</div>
						    	<div class='quip'>
						    		<div class='equipment' id='mainHand' code='17075'>
						    			<img class='icon' src="/wow/static/icon/inv_sword_18.png">
						    		</div>
						    	</div>
						        <div class='quip' >
						        	<div class='equipment' id='offHand' code='15806'>
						    			<img class='icon' src="/wow/static/icon/inv_sword_34.png">
						        	</div>
						        </div>
						        <div class='quip' >
						        	<div class='equipment' id='bow' code='17069'>
						    			<img class='icon' src="/wow/static/icon/inv_weapon_bow_08.png">
						        	</div>
						        </div>
						        <div class='quip'>
						        	<div class='equipment' id='talisman2' code='13965'>
						    			<img class='icon' src="/wow/static/icon/inv_misc_armorkit_09.png"">
						        	</div>
						        </div>
						  </footer>
					
					</div>
				</div>
				<div title='天赋'>
					<p>没做,默认标准狂暴战天赋</p>
				</div>
				</div>
			</div>
			<div region="center">
				<div fit='true' class="easyui-tabs">
					<div title='属性面板'>
						<div class="easyui-layout" fit="true"  >
							<div region="north" class="easyui-tabs" style="height:390px;">
								<div id='simulatePanel' title='增益'>
									<div  class="easyui-layout" fit='true'>
									<div region="north" border="false" height="150px" style='display:table;'>
												<table style='font-size:12px;display:table-cell;vertical-align: middle;'>
													<tr>
														<td>
																首领：<input id='boss' class="easyui-combobox" >
														</td>
													</tr>
													<tr>
														<td id='bossArmor'>
																
														</td>
														<td id='bossDr'>
																
														</td>
													</tr>
													<tr>
														<td>
															<a href="javascript:void(0)" class="easyui-linkbutton c1"
															onclick="addDeBuff()">敌方减益</a>
														</td>
														<td>
															<div class='debuffColumn' id='debuffColumn' >
															</div>
														</td>
													</tr>
													<tr>
														<td>
															<a href="javascript:void(0)" class="easyui-linkbutton c1"
															onclick="addBuff()">自身增益</a>
														</td>
														<td>
															<div  class='buffColumn' id='buffColumn' >
															</div>
														</td>
													</tr>
												</table>
										</div>
										<div region="center">
												<table id="dg" class="easyui-datagrid" fit="true" 
											            title="2分钟常规循环的伤害期望"  idField="id" loadMsg='正在努力加载...请稍等...'>
												        <thead>
												            <tr>
												                <th field="name" width="100" align="center" >内容</th>
												                <th field="total" width="120" align="center">总伤害</th>
												                <th field="times" width="70" align="center">次数</th>
												                <th field="hit" width="70" align="center">平均伤害</th>
												                <th field="crit" width="70" align="center">暴击率</th>
												                <th field="percent" width="70" align="center">占比</th>
												            </tr>
												        </thead>
												</table>
										</div>
									</div>
								</div>
								<div title='附魔'>
									<table class="gridtable">
										<tr>
											<td>头部：<input id='headEnchant' class="easyui-combobox" vlaue='8n'></td>
										</tr>
										<tr>
											<td>肩部：<input id='shoulderEnchant' class="easyui-combobox" ></td>
										</tr>
										<tr>
											<td>披风：<input id='cloakEnchant' class="easyui-combobox" ></td>
										</tr>
										<tr>
											<td>胸甲：<input id='breastplateshoulderEnchant' class="easyui-combobox" ></td>
										</tr>
										<tr>
											<td>护腕：<input id='bracerEnchant' class="easyui-combobox" ></td>
										</tr>
										<tr>
											<td>手套：<input id='gauntletsEnchant' class="easyui-combobox" ></td>
										</tr>
										<tr>
											<td>腿部：<input id='pantsEnchant' class="easyui-combobox" ></td>
										</tr>
										<tr>
											<td>靴子：<input id='bootsEnchant' class="easyui-combobox" ></td>
										</tr>
									</table>
								</div>
								<div title='套装'>
										<table id="suitTooltip" class="easyui-datagrid" fit="true" 
											            title="套装效果"  idField="id">
												        <thead>
												            <tr>
												                <th field="name" width="120" align="center" >名称</th>
												                <th field="num" width="120" align="center"></th>
												                <th field="tooltip" width="300" align="center">效果</th>
												            </tr>
												        </thead>
												</table>
								</div>
								<div title='伤害模拟'>
									<div  class="easyui-layout" fit='true'>
										<div region="north" border="false" heiht='150px' style='display:table;'>
											<table style='font-size:12px;display:table-cell;vertical-align: middle;'>
												<tr>
															<td>
																<a href="javascript:void(0)" class="easyui-linkbutton c1"
																onclick="startSimulation()">开始模拟</a>
																	<a href="javascript:void(0)" class="easyui-linkbutton c1"
																onclick="stopSimulation()">停止模拟</a>
																<label>战斗时长:</label>
																<input id='duration' class="easyui-combobox" style="width:80px;"
																	data-options="valueField: 'value',
																	textField: 'label',
																	data: [{
																			label: '1分钟',
																			value: '60'
																		},{
																			label: '2分钟',
																			value: '120'
																		},{
																			label: '3分钟',
																			value: '180'
																		},{
																			label: '3分半',
																			value: '210'
																		},
																		{
																			label: '6分钟',
																			value: '360'
																		},{
																			label: '6分半',
																			value: '390'
																		},{
																			label: '10分钟',
																			value: '600'
																		}]" >
															    <input type="checkbox" id="isCyclone"  checked >旋风斩</input>
																<input type="checkbox" id="isRash"  checked >鲁莽</input>
																<input type="checkbox" id="isExecute"  checked >斩杀</input>
															</td>
												</tr>
												<tr>
													<td>
														<div id="record" class="easyui-panel" title="战斗记录"
														    style="width:580px;height:120px;padding:10px;background:#fafafa;"
														    data-options="collapsible:true,maximizable:true">
														</div>
													</td>
												</tr>
												<tr>
													<td >
														<span id='anger'>怒气：0</span>&nbsp;&nbsp;&nbsp;<span id='flurry'>乱舞：0</span>&nbsp;&nbsp;&nbsp;<span id='total'>总伤害：0</span>&nbsp;&nbsp;&nbsp;<span id='dps'>秒伤：0</span>
													</td>
												</tr>
											</table>
										</div>
										<div region="center" >
											<table id="static" class="easyui-datagrid" fit="true" 
												            title="伤害统计"  idField="id" loadMsg='正在努力加载...请稍等...'>
													        <thead>
													            <tr>
													                <th field="name" width="100" align="center" >内容</th>
													                <th field="total" width="120" align="center">总伤害</th>
													                <th field="times" width="70" align="center">次数</th>
													                <th field="crit" width="70" align="center">暴击率</th>
													                <th field="miss" width="70" align="center">未命中</th>
													                <th field="dodge" width="70" align="center">被躲闪</th>
													                <th field="percent" width="70" align="center">占比</th>
													            </tr>
													        </thead>
											</table>
										</div>
									</div>
								</div>
							</div>
							<div region='center' border="false" >
								<div fit='true' class="easyui-layout">
										<div region="north" border="false" height="35px" style='display:table;'>
											<div style='display:table-cell;vertical-align: middle;'>
												种族：<input id='race' class="easyui-combobox" >
											</div>
										</div>
										<div region='center' border="false"  border="true" >
											<div fit='true' class="easyui-layout">
												<div region="west"  style="width:50%;">
													<table class="gridtable" width='300px' heitght='180px'>
															<tr>
																<td >
																	<div id='strength'>力量：82</div>
																</td>
															</tr>
															<tr>
																<td >
																	<div id='nimble'>敏捷：126</div>
																</td>
															</tr>
															<tr>
																<td >
																	<div id='intelligence'>智力：34</div>
																</td>
															</tr>
															<tr>
																<td >
																	<div id='mental'>精神：49</div>
																</td>
															</tr>
															<tr>
																<td >
																	<div id='endurance'>耐力：78</div>
																</td>
															</tr>
															<tr>
																<td >
																	<div id='armor'>护甲：3000</div>
																</td>
															</tr>
													</table>
												</div>
												<div region='center'>
													<table class="gridtable" width='300px' heitght='180px'>
															<tr>
																<td >
																	<div id='skills'>熟练度：305/305</div>
																</td>
															</tr>
															<tr>
																<td >
																	<div id='damage'>伤害：210~380</div>
																</td>
															</tr>
															<tr>
																<td >
																	<div id='speed'>速度：2.8/1.8</div>
																</td>
															</tr>
															<tr>
																<td >
																	<div id='ap'>强度：308</div>
																</td>
															</tr>
															<tr>
																<td >
																	<div id='crit'>暴击率：34</div>
																</td>
															</tr>
															<tr>
																<td >
																	<div id='hitRate'>命中率：10%</div>
																</td>
															</tr>
													</table>
												</div>
											</div>
										</div>
								</div>
							</div>
						</div>
					</div>
					
				</div>
			</div>
		</div>
	</div>
	
	
</body>
</html>